package Hot100.Easy.LC70;

/**
 * 爬楼梯（斐波那契数列）
 */
public class LC70 {
    public static void main(String[] args) {
        LC70 solution = new LC70();
        System.out.println(solution.climbStairs(5));

    }
    public int climbStairs(int n) {
        int a=1,b=1;
        int sum=0;
        for(int i=2;i<=n;i++){
            sum=a+b;
            a=b;
            b=sum;
        }
        return b;
    }
}
